package com.weds.data_sync.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Description 测试服务
 * @Author lihw
 * @Date 2024/1/3 8:32
 */
@Slf4j
@Service
public class TestService {

    public void start() {
        log.info("调用python服务接口");
        log.info("java service: " + PythonMethod.readData());
        log.info("java service: " + PythonMethod.writeMiddleDB());
        log.info("java service: " + PythonMethod.etlClean());
        log.info("java service: " + PythonMethod.eltFormat());
        log.info("java service: " + PythonMethod.writeDB());
        log.info("java service: " + "发送广播通知业务");
    }

}

@Slf4j
class PythonMethod {
    public static String readData() {
        log.info("python: 读取数据");
        return "读取成功";
    }

    public static String writeMiddleDB() {
        log.info("python: 写入中间库");
        return "写入中间库成功";
    }

    public static String etlClean() {
        log.info("python: 数据清洗");
        return "数据清洗成功";
    }

    public static String eltFormat() {
        log.info("python: 数据格式化");
        return "数据格式化成功";
    }

    public static String writeDB() {
        log.info("python: 写入业务库");
        return "写入业务库成功";
    }
}
